﻿<div class="grid_20           push_4" id="bodyContent">



         

<script src="includes/general.js" type="text/javascript"></script>
<script type="text/javascript">&lt;!--
function check_form() {
  var error_message = "Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n";
  var error_found = false;
  var error_field;
  var keywords = document.advanced_search.keywords.value;
  var dfrom = document.advanced_search.dfrom.value;
  var dto = document.advanced_search.dto.value;
  var pfrom = document.advanced_search.pfrom.value;
  var pto = document.advanced_search.pto.value;
  var pfrom_float;
  var pto_float;

  if ( ((keywords == '') || (keywords.length &lt; 1)) &amp;&amp; ((dfrom == '') || (dfrom.length &lt; 1)) &amp;&amp; ((dto == '') || (dto.length &lt; 1)) &amp;&amp; ((pfrom == '') || (pfrom.length &lt; 1)) &amp;&amp; ((pto == '') || (pto.length &lt; 1)) ) {
    error_message = error_message + "* At least one of the fields in the search form must be entered.\n";
    error_field = document.advanced_search.keywords;
    error_found = true;
  }

  if (dfrom.length &gt; 0) {
    if (!IsValidDate(dfrom, 'mm/dd/yyyy')) {
      error_message = error_message + "* Invalid From Date.\n";
      error_field = document.advanced_search.dfrom;
      error_found = true;
    }
  }

  if (dto.length &gt; 0) {
    if (!IsValidDate(dto, 'mm/dd/yyyy')) {
      error_message = error_message + "* Invalid To Date.\n";
      error_field = document.advanced_search.dto;
      error_found = true;
    }
  }

  if ((dfrom.length &gt; 0) &amp;&amp; (IsValidDate(dfrom, 'mm/dd/yyyy')) &amp;&amp; (dto.length &gt; 0) &amp;&amp; (IsValidDate(dto, 'mm/dd/yyyy'))) {
    if (!CheckDateRange(document.advanced_search.dfrom, document.advanced_search.dto)) {
      error_message = error_message + "* To Date must be greater than or equal to From Date.\n";
      error_field = document.advanced_search.dto;
      error_found = true;
    }
  }

  if (pfrom.length &gt; 0) {
    pfrom_float = parseFloat(pfrom);
    if (isNaN(pfrom_float)) {
      error_message = error_message + "* Price From must be a number.\n";
      error_field = document.advanced_search.pfrom;
      error_found = true;
    }
  } else {
    pfrom_float = 0;
  }

  if (pto.length &gt; 0) {
    pto_float = parseFloat(pto);
    if (isNaN(pto_float)) {
      error_message = error_message + "* Price To must be a number.\n";
      error_field = document.advanced_search.pto;
      error_found = true;
    }
  } else {
    pto_float = 0;
  }

  if ( (pfrom.length &gt; 0) &amp;&amp; (pto.length &gt; 0) ) {
    if ( (!isNaN(pfrom_float)) &amp;&amp; (!isNaN(pto_float)) &amp;&amp; (pto_float &lt; pfrom_float) ) {
      error_message = error_message + "* Price To must be greater than or equal to Price From.\n";
      error_field = document.advanced_search.pto;
      error_found = true;
    }
  }

  if (error_found == true) {
    alert(error_message);
    error_field.focus();
    return false;
  } else {
    return true;
  }
}

function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150')
}
//--&gt;</script>

<h1><cufon class="cufon cufon-canvas" alt="Advanced " style="width: 118px; height: 32px;"><canvas width="132" height="29" style="width: 132px; height: 29px; top: 4px; left: 0px;"></canvas><cufontext>Advanced </cufontext></cufon><cufon class="cufon cufon-canvas" alt="Search" style="width: 75px; height: 32px;"><canvas width="87" height="29" style="width: 87px; height: 29px; top: 4px; left: 0px;"></canvas><cufontext>Tìm kiếm</cufontext></cufon></h1>


<form onsubmit="return check_form(this);" method="get" action="/advanced_search_result.php" name="advanced_search">
<div class="contentContainer min_height_750">
  <h2>Tiêu chí tìm kiếm</h2>

  <div class="contentText">
    <div>
      <input type="text" style="width: 99%" name="keywords"><input type="hidden" value="1" name="search_in_description">    </div>

    <br>

    <div>
      <span><a onclick="$('#helpSearch').dialog('open'); return false;" target="_blank" href="/popup_search_help.php"><u>Search Help</u> [?]</a></span>
      <span style="float: right;"><span class=" "><button type="submit" id="tdb9" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-primary" role="button" aria-disabled="false"><span class="ui-button-icon-primary ui-icon ui-icon-search"></span><span class="ui-button-text">Tìm kiếm</span></button></span><script type="text/javascript">$("#tdb9").button({icons:{primary:"ui-icon-search"}}).addClass("ui-priority-primary").parent().removeClass("tdbLink");</script></span>
    </div>

    

<script type="text/javascript">
$('#helpSearch').dialog({
  autoOpen: false,
  buttons: {
    Ok: function() {
      $(this).dialog('close');
    }
  }
});
</script>

    <br>

    <table width="100%" cellspacing="0" cellpadding="2" border="0">
      <tbody><tr>
        <td class="fieldKey">Categories:</td>
        <td class="fieldValue"><select name="categories_id"><option selected="selected" value="">All Categories</option><option value="23">Blu-ray &amp; DVD Players</option><option value="36">&nbsp;&nbsp;Compact System Cameras</option><option value="33">&nbsp;&nbsp;Dishwashers</option><option value="35">&nbsp;&nbsp;Internet TV</option><option value="37">&nbsp;&nbsp;LCD TV</option><option value="34">&nbsp;&nbsp;LED TV</option><option value="31">&nbsp;&nbsp;Lenses</option><option value="32">&nbsp;&nbsp;Ranges</option><option value="29">Camcorders</option><option value="27">Cameras</option><option value="24">Home Theater Systems</option><option value="30">Microwaves</option><option value="22">Printer</option><option value="28">Projectors</option><option value="26">TVs</option><option value="25">Washers &amp; Dryers</option></select></td>
      </tr>
      <tr>
        <td class="fieldKey">&nbsp;</td>
        <td class="smallText"><input type="checkbox" checked="checked" value="1" name="inc_subcat"> Include Subcategories</td>
      </tr>
      <tr>
        <td class="fieldKey">Nhà sản xuất:</td>
        <td class="fieldValue"><select name="manufacturers_id"><option selected="selected" value="">All Manufacturers</option><option value="7">Cameras</option><option value="3">Printer</option><option value="10">Projectors</option><option value="2">TVs</option></select></td>
      </tr>
      <tr>
        <td class="fieldKey">Giá từ:</td>
        <td class="fieldValue"><input type="text" name="pfrom"></td>
      </tr>
      <tr>
        <td class="fieldKey">Đến:</td>
        <td class="fieldValue"><input type="text" name="pto"></td>
      </tr>
      <tr>
        <td class="fieldKey">Từ ngày:</td>
        <td class="fieldValue"><input type="text" id="dfrom" name="dfrom" class="hasDatepicker"><script type="text/javascript">$('#dfrom').datepicker({dateFormat: 'mm/dd/yy', changeMonth: true, changeYear: true, yearRange: '-10:+0'});</script></td>
      </tr>
      <tr>
        <td class="fieldKey">Đến ngày:</td>
        <td class="fieldValue"><input type="text" id="dto" name="dto" class="hasDatepicker"><script type="text/javascript">$('#dto').datepicker({dateFormat: 'mm/dd/yy', changeMonth: true, changeYear: true, yearRange: '-10:+0'});</script></td>
      </tr>
    </tbody></table>
  </div>
</div>

</form>


<!--        B a n n e r s   Bottom    //-->

			
</div>